package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OTestPaperQueMapper;
import com.education.online.pojo.OTestPaperQue;
import com.education.online.service.OTestPaperQueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 职业技能测试试题和试卷关联表 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:49
 */
@Service
public class OTestPaperQueServiceImpl implements OTestPaperQueService {

    @Autowired
    private OTestPaperQueMapper oTestPaperQueMapper;

    //查询职业技能测试试题和试卷关联表信息
    @Override
    public OTestPaperQue selectOTestPaperQueById(Integer paperId) {
        return oTestPaperQueMapper.selectOTestPaperQueById(paperId);
    }

    // 查询职业技能测试试题和试卷关联表列表
    @Override
    public List<OTestPaperQue> selectOTestPaperQueList(OTestPaperQue oTestPaperQue) {
        return oTestPaperQueMapper.selectOTestPaperQueList(oTestPaperQue);
    }

    // 新增职业技能测试试题和试卷关联表
    @Override
    public int insertOTestPaperQue(OTestPaperQue oTestPaperQue) {
        return oTestPaperQueMapper.insertOTestPaperQue(oTestPaperQue);
    }

    //修改职业技能测试试题和试卷关联表
    @Override
    public int updateOTestPaperQue(OTestPaperQue oTestPaperQue) {
        return oTestPaperQueMapper.updateOTestPaperQue(oTestPaperQue);
    }

    //删除职业技能测试试题和试卷关联表对象
    @Override
    public int deleteOTestPaperQueByIds(String ids) {
        return oTestPaperQueMapper.deleteOTestPaperQueByIds(Convert.toStrArray(ids));
    }
}